<?php
//page def
//the page title
$title = "TEMP";

// dB connection
include ("./db.php");

//adds the header
include ("./head.php");

//start page
?>
<body>
<center>
<table>
<tr>
<th colspan="2" class="logo"><img src="./images/logo.png" alt="My Personal Cook Book" align="left" /></th>
</tr>
<tr>
<td class="menu">
<?php
//adds menu
include ("./menu.php");

?>
</td>
<td class = "page">
<div class = "title">
<?php 
echo $title;
if ($rec_name != NULL) {echo " - " .$rec_name;} 
?>
</div>
<div class = "post_text">
<?php /* content */ ?>
This is a test of my personal cook book page...<br />
Heres a list of recipes:<br />
<?php
	$query = "SELECT * FROM recipe ORDER BY rec_id";
   	$result = mysql_query($query) or die(mysql_error());
   	while ($row = mysql_fetch_array($result)) {
		 $rec_id = $row[0];
    	 $rec_name = $row[1];
		 $rec_cat = $row[2];
		 $rec_main = $row[3];
		 $rec_prep = $row[4];
		 $rec_cook = $row[5];
		 $rec_serves = $row[6];
		 $rec_source = $row[7];
		 $rec_qm = $row[8];
		 $rec_ingred = $row[9];
		 $rec_direct = $row[10];
		 $rec_notes = $row[11];
		 
		 echo "<b>" .$rec_name. "</b><br />\n"; 
	}
?>
</div>
</td>
</tr>
<tr>
<td colspan="2" class="foot">
<?php
//adds footer
include ("./footer.php");

?>
</td>
</tr>
</table>
</center>
</body>
</html>
